// Shuffle array
Array.prototype.shuffle = function() {
    return this.sort(function() { return (Math.round(Math.random())-0.5); });
}

// Fix for IE <= 8
if (!('map' in Array.prototype)) {
  Array.prototype.map= function(mapper, that /*opt*/) {
    var other= new Array(this.length);
    for (var i= 0, n= this.length; i<n; i++)
      if (i in this)
        other[i]= mapper.call(that, this[i], i, this);
    return other;
  };
}
